package com.example.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.user.model.User;
import jakarta.servlet.http.HttpServletRequest;

public interface UserService extends IService<User> {

    /**
     * 用户注册
     * @param userAccount 用户账户
     * @param userPassword 用户密码
     * @param checkPassword 用户校验密码
     * @return 注册结果
     */
    long userRegister(String userAccount , String userPassword , String checkPassword);


    /**
     * 用户登录
     * @param userAccount 用户账户
     * @param userPassword 用户密码
     * @return 用户信息
     */
    User userLogin(String userAccount , String userPassword , HttpServletRequest request);

    int logout(HttpServletRequest request);


    User toSafeUser(User user);
}
